package org.airlink.persistence.query {
	import flash.data.SQLResult;
	import flash.data.SQLStatement;
	import flash.errors.IllegalOperationError;
	import flash.utils.describeType;
	
	import flex.persistence.EntityManager;
	import flex.persistence.EntityTransaction;
	import flex.persistence.FlushModeType;
	import flex.persistence.exceptions.NoResultException;
	import flex.persistence.exceptions.NonUniqueResultException;
	import flex.persistence.Query;
	
	import mx.utils.ObjectUtil;
	import mx.utils.StringUtil;
	
	import org.airlink.persistence.Entity;
	import org.airlink.persistence.EntityIntrospector;
	import org.airlink.persistence.EntityManagerImpl;
	import org.airlink.persistence.associations.Association;
	import org.airlink.persistence.associations.BasicField;
	import org.airlink.persistence.associations.ManyToManyAssociation;
	import org.airlink.persistence.associations.ManyToOneAssociation;
	import org.airlink.persistence.associations.OneToManyAssociation;
	import org.airlink.persistence.associations.OneToOneAssociation;
	
	public class QlQuery extends AbstractQuery {
		private var ql:String;
		
		public function QlQuery(ql:String, entityManager:EntityManagerImpl, transaction:EntityTransaction) {
			super(null, entityManager, transaction);
//			this.resultClass = resultClass;
/*			if(resultClass) {
				isSimple = ObjectUtil.isSimple(new resultClass());
			}
*/		}
		
		override public function executeUpdate():int {
			throw new IllegalOperationError("Not implemented.");
		}
		
		override public function getResultList():Array {
			return null;
		}
		
		override public function getSingleResult():Object {
			return null;
		}
		
		private function getResultClassFromQL(ql:String):Class {
			var pattern:RegExp = /select/i;
			return null;
		}  
	}
}